#!/usr/bin/env python
# coding: utf-8

# 编写一个程序，它接受一个由空格分隔的单词序列作为输入，输出仅由数字组成的单词。
# 
# 输入：`s = "2 cats and 3 dogs."`
# 
# 预期输出:`['2', '3']`

# In[1]:


s = "2 cats and 3 dogs."
email = s.split()
ans = [word for word in email if word.isdigit()]
print(ans)

